//
//  ACSearchResultController.h
//  ACFramework
//
//  Created by caoyq on 2017/12/13.
//
/*
 摸索使用中，后面需要贴出一个使用步骤方法.
 */

#import <UIKit/UIKit.h>

/** UISearchController + 自定义的显示控制器UITableViewController */
@interface ACSearchResultController : UITableViewController

/** 搜索框 */
@property (nonatomic, strong) UISearchController *searchController;

/** 搜索控制器中的数据源 */
@property (nonatomic, strong) NSMutableArray *searchResultArray;

#pragma mark - 带返回值的Block，外部通过block传回值自定义cell样式等

@property (copy) NSInteger (^numberOfSectionsInTableViewCompletion)(UITableView *tableView);

@property (copy) NSInteger (^numberOfRowsInSectionCompletion)(UITableView *tableView, NSInteger section);

@property (copy) CGFloat (^heightForRowAtIndexPathCompletion)(UITableView *tableView, NSIndexPath *indexPath);

@property (copy) UITableViewCell *(^cellForRowAtIndexPathCompletion)(UITableView *tableView, NSIndexPath *indexPath);

@property (copy) void (^didSelectRowAtIndexPathCompletion)(UITableView *tableView, NSIndexPath *indexPath);

//不常用

@property (nonatomic, copy) BOOL (^canEditRowAthIndexPath)(UITableView *tableView, NSIndexPath *indexPath);

@property (nonatomic, copy) void (^didDeselectRowAtIndexPathCompletion)(UITableView *tableView, NSIndexPath *indexPath);

@end
